/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: EditRoleEvent.java
 * Date: 08/02/2011
 */

package com.ingenius.sau.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.ingenius.sau.client.event.EditRoleEvent.EditRoleEventHandler;

/**
 * Class <strong>EditRoleEvent</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class EditRoleEvent extends GwtEvent<EditRoleEventHandler> {

	public interface EditRoleEventHandler extends EventHandler {

		void onEditRole(EditRoleEvent event);
	}

	public static Type<EditRoleEventHandler> TYPE = new Type<EditRoleEventHandler>();

	private final String roleId;

	public EditRoleEvent(String roleId) {
		this.roleId = roleId;
	}

	public String getRoleId() {
		return roleId;
	}

	@Override
	public Type<EditRoleEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EditRoleEventHandler handler) {
		handler.onEditRole(this);
	}

}
